package com.ourteam.product.api;

import com.ourteam.frame.web.AbstractSearchModel;
import com.ourteam.product.ui.dao.ProductUITreeNodeDAOQueryBean;
import com.ourteam.product.ui.domain.ProductUITreeNodeBean;

public class ProductUITreeNodeSearchModel extends AbstractSearchModel<ProductUITreeNodeDAOQueryBean> {

	private long treeId;

	public long getTreeId() {
		return treeId;
	}

	public void setTreeId(long treeId) {
		this.treeId = treeId;
	}

	@Override
	public String getMappedDAOField(String aProperty) {
		return ProductUITreeNodeBean.getMappedDAOField(aProperty);
	}

	@Override
	protected void doBuildQueryBean(ProductUITreeNodeDAOQueryBean queryBean) throws Exception {

		ProductUITreeNodeDAOQueryBean.Criteria criteria = queryBean.createCriteria();

		criteria.andTreeIdEqualTo(treeId);

	}

}
